package cn.amaake.interceptor;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

import cn.amaake.common.model.Student;

public class StuLoginInterceptor implements Interceptor {

	@Override
	public void intercept(Invocation inv) {
		Student user = inv.getController().getSessionAttr("stusession");
        if(user == null){
            inv.getController().render("/views/stuweb/login.html");
        }else{
            inv.invoke();
        }
	}

}
